package net.cellkyborg.server;
import java.io.*;

public class UpdateHandler {
	public int [] UKEYS= new int [136];
	public static int [] UKEYS2= new int [512];
	public static int [] UKEYS3= new int [512];
	public static int [] UKEYS4= new int [1414];
	public static int [] UKEYS5= new int [1414];
	public static int [] UKEYS6= new int [1176];
	
	public int [] LOGIN= new int [153];
	public static int [] CHAR= new int [120];
	public static int [] F200= new int [62];
	public int [] SKILLXP= new int [235];
	
	public void loadData() {
		try {
			BufferedReader fin = new BufferedReader(new FileReader("data/UKEY.dat"));
			String nl;
			for (int i=0;i<136;i++) {
				nl=fin.readLine();
				UKEYS[i]=Integer.parseInt(nl);
			}
			
			fin = new BufferedReader(new FileReader("data/LOGIN.dat"));
			for (int i=0;i<50;i++) {
				nl=fin.readLine();
				LOGIN[i]=Integer.parseInt(nl);
			}
			
			fin = new BufferedReader(new FileReader("data/SKILLXP.dat"));
			for (int i=0;i<235;i++) {
				nl=fin.readLine();
				SKILLXP[i]=Integer.parseInt(nl);
			}
			/*
			fin = new BufferedReader(new FileReader("data/UKEY2.dat"));
			for (int i=0;i<512;i++) {
				nl=fin.readLine();
				UKEYS2[i]=Integer.parseInt(nl);
			}
			fin = new BufferedReader(new FileReader("data/UKEY3.dat"));
			for (int i=0;i<512;i++) {
				nl=fin.readLine();
				UKEYS3[i]=Integer.parseInt(nl);
			}
			
			fin = new BufferedReader(new FileReader("data/UKEY4.dat"));
			for (int i=0;i<1414;i++) {
				nl=fin.readLine();
				UKEYS4[i]=Integer.parseInt(nl);
			}
			fin = new BufferedReader(new FileReader("data/UKEY5.dat"));
			for (int i=0;i<1414;i++) {
				nl=fin.readLine();
				UKEYS5[i]=Integer.parseInt(nl);
			}
			
			fin = new BufferedReader(new FileReader("data/UKEY6.dat"));
			for (int i=0;i<1176;i++) {
				nl=fin.readLine();
				UKEYS6[i]=Integer.parseInt(nl);
			}
			
			
			
			fin = new BufferedReader(new FileReader("data/CHAR.dat"));
			for (int i=0;i<120;i++) {
				nl=fin.readLine();
				CHAR[i]=Integer.parseInt(nl);
			}
			
			fin = new BufferedReader(new FileReader("data/F200.dat"));
			for (int i=0;i<62;i++) {
				nl=fin.readLine();
				F200[i]=Integer.parseInt(nl);
			}
			*/
			fin.close();
		}
		catch (IOException ex) {
			misc.println("ERROR: Update keys have not been loaded. This may occure in server disfunction!");
		}
		
	}	
}